package com.mk.service;

import com.mk.base.service.IBaseService;
import com.mk.model.entity.Resource;
import com.mk.model.request.ResourceRequest;

import java.util.List;
import java.util.Set;

/**
 * @Author: yq
 * @Description:
 * @Date: Created in 3:45 PM 3/13/18
 */
public interface IResourceService extends IBaseService<Resource> {

    Resource save(ResourceRequest request);

    Boolean update(ResourceRequest request);

    Boolean delete(Long id);

    Resource get(Long id);

    Resource get(String code);

    List<Resource> getByUsername(String username);

    Set<String> getCodesByUsername(String username);

    List<Resource> getList();

    List<Resource> getResourcesByRoleId(Long roleId);

    List<Resource> getResourcesByRoleCode(String roleCode);

    List<Resource> getResources(Long parentId,String type);
}
